
import { NavLink, useNavigate,Link } from 'react-router-dom';

function List() {
    const listItems = [];
    for (let i = 0; i < 3; i++) {
        listItems.push(
            
        );
    }
    return <ul>{listItems}</ul>;
}
export default function Navbar() {
  const navigate = useNavigate(); // 编程式导航
  // 退出登录逻辑
  const handleLogout = () => {
    navigate('/login'); // 退出后跳转到登录页
  };

  return (
    <nav className='comm-left'>
        <ul>
            <li className='comm-left-li'>
                <NavLink to="/home">首页</NavLink>
            </li>
            <li className='comm-left-li'>
                <NavLink to="/list">列表</NavLink>
            </li>
            <li className='comm-left-li'>
                <NavLink to="/upload">上传文件</NavLink>
           </li>
        </ul>
    </nav>
  );
}